<template>
  <div>
    <infinite-canvas>
      <!-- 在这里添加你的画布内容，例如一个可拖动和缩放的图形 -->
      <div class="draggable-object" @mousedown="startDrag" @mouseup="endDrag" @mousemove="dragging">
        <!-- 你的图形内容 -->
      </div>
    </infinite-canvas>
  </div>
</template>

<script>
import InfiniteCanvas from './InfiniteCanvas.vue';

export default {
  components: {
    InfiniteCanvas
  },
  methods: {
    startDrag(event) {
      // 处理拖动逻辑
    },
    endDrag() {
      // 处理拖动结束逻辑
    },
    dragging(event) {
      // 处理拖动中逻辑
    }
  }
};
</script>

<style scoped>
.draggable-object {
  position: absolute;
  width: 100px;
  height: 100px;
  background-color: #3498db;
  cursor: grab;
}
</style>
